# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgname=libnumbertext
pkgver=1.0.7
pkgrel=1
pkgdesc="Number to number name and money text conversion library"
arch=('x86_64')
url="https://github.com/Numbertext/libnumbertext"
license=('LGPL3' 'custom')
depends=('gcc-libs')
source=(https://github.com/Numbertext/libnumbertext/archive/$pkgver.tar.gz)
sha256sums=('5ea8359532d7b8d7a1b63ccc7825fb3b4f8c6dcdee75cb80206d9647c50d4a03')

prepare() {
  cd "$pkgname-$pkgver"
  autoreconf -vfi
}

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr
  make
}

check() {
  cd "$pkgname-$pkgver"
  make -k check
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
  # add dual license file
  install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 COPYING
}
